package com.ssslogin.dao;

import com.ssslogin.pojo.Resume;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created with IntelliJ IDEA by ChouFy on 2020-03-11.
 *
 * @author zhoufy
 */
public interface ResumeDao extends JpaRepository<Resume, Long>, JpaSpecificationExecutor<Resume> {


    /**
     * 查询所有
     *
     * @return
     */
    @Query("from Resume")
    List<Resume> findByJpql();



    /**
     * 新增或更新
     *
     * @param resume
     * @return
     */
    @Override
    Resume save(Resume resume);


    /**
     * 删除数据
     *
     * @param resume
     */
    @Override
    void delete(Resume resume);
}
